﻿using System;

namespace ValueRefTypes
{
    class Program
    {
        enum Gender
        {
            Male,
            Female,
            Unknown
        }
        static void Main(string[] args)
        {
            int a = 5;
            int b = a;
            Console.WriteLine(object.ReferenceEquals(a, b));

            a = 1;
            Console.WriteLine(object.ReferenceEquals(a, b));


            Console.WriteLine("a = " + a);
            Console.WriteLine("b = " + b);


            string s1 = "Hello";
            string s2 = s1;
            Console.WriteLine(object.ReferenceEquals(s1, s2));

            s1 = "World";
            Console.WriteLine(object.ReferenceEquals(s1, s2));

            Console.WriteLine("s1 = " + s1);
            Console.WriteLine("s2 = " + s2);


            object obj1 = new object();
            object obj2 = obj1;

            Console.WriteLine(object.ReferenceEquals(obj1, obj2));
            obj1 = new object();
            Console.WriteLine(object.ReferenceEquals(obj1, obj2));


            int[] x = new int[1] { 1 };
            int[] y = x;

            Console.WriteLine(x[0]);
            Console.WriteLine(y[0]);

            x[0] = 2;

            Console.WriteLine(x[0]);
            Console.WriteLine(y[0]);

            Console.WriteLine((int)DayOfWeek.Friday);

            DayOfWeek d = DayOfWeek.Saturday;
            Console.WriteLine(d);

            Console.ReadKey();
            
        }
    }
}
